﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TheCell
{
    public class CellUtils
    {
        public static List<Cell> InitializeCell()
        {
            int id = 1;
            List<Cell> cells = new List<Cell>();
            for (int line = 1; line < 10; line++)
            {
                for (int col = 1; col < 10; col++)
                {
                    Cell cell = new Cell();
                    cell.Id = id;
                    id++;
                    cell.Change = false;//也许没必要
                    cell.Status = CellStatus.None;
                    cell.Possible = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
                    cell.Location = new Location(line, col);
                    cells.Add(cell);
                }
            }
            return cells;
        }
    }
}

/*public Cell(int x, int y)
{
    this.Status = CellStatus.None;
    this.Possible = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    this.Location = new Location(x, y);
}*/


/*List<Cell> cells = new List<Cell>();
for (int line = 1; line < 10; line++)
{
    for (int col = 1; col < 10; col++)
    {
        Cell cell = new Cell(line, col);
        cells.Add(cell);
    }
}*/